package com.samphanie.security.security.service.impl;

import lombok.extern.slf4j.Slf4j;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsPasswordService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;

/**
 * 默认的 UserDetailsPasswordService 实现
 *
 * @author Dries
 * @email 1451691457@qq.com
 */
@Slf4j
public class DefaultUserDetailsPasswordServiceImpl implements UserDetailsPasswordService {

    @Override
    public UserDetails updatePassword(UserDetails userDetails, String newPassword) {
        log.warn("请配置 UserDetailsPasswordService 接口的实现.");
        throw new UsernameNotFoundException(userDetails.getUsername());
    }

}
